OTScheduleDeferredTask
Schedules a task for execution at deferred task time.C INTERFACE
Boolean OTScheduleDeferredTask(long dtCookie)C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
dtCookie
- A reference that identifies the task to be scheduled.
DESCRIPTION
TheOTScheduleDeferredTask
function schedules for execution at the next deferred task time the task associated with thedtCookie
parameter, which is the reference returned by theOTCreateDeferredTask
function.You can call this function at any time. If you have not yet destroyed a task, you can use this function to reschedule the same task more than once.
If you makes multiple calls to the
OTScheduleDeferredTask
function before the task is executed, additional tasks are not scheduled; only one instance of each unique task can only be scheduled at a time.This function returns
true
if it scheduled the deferred task successfully,false
if not. If it returnsfalse
and thedtCookie
parameter has a valid value (other than 0), then the task is already scheduled to run. IfdtCookie
is invalid (a value of 0), the function returnsfalse
and does nothing.If you want to call Open Transport from an interrupt, you can use this function (and the
OTCreateDeferredTask
function) instead of the standard Deferred Task Manager functionDTInstall
to create a deferred task that permits you to call Open Transport function calls. This allows Open Transport to adapt to changes in the underlying operating system without affecting the client's code.SPECIAL CONSIDERATIONS
You can call this Open Transport function at interrupt time, but you must precede it by calling theOTEnterInterrupt
function and you must follow it by calling theOTLeaveInterrupt
function.SEE ALSO
To create a deferred task for execution at deferred task time, call theOTCreateDeferredTask
function (page 7-14).To destroy a task created with the
OTCreateDeferredTask
function, call theOTDestroyDeferredTask
function (page 7-18).Before making this call from within an interrupt, use the
OTEnterInterrupt
function (page 7-19).After you have made this call from within an an interrupt, use the
OTLeaveInterrupt
function (page 7-20).